#coding=utf-8
from zhaokelai.customer.models import *
from django.contrib import admin

class cstAdmin(admin.ModelAdmin):
    list_display = ('fullname', 'sex','age','mobile','email')
    list_display_links = ('fullname', 'sex','age','mobile','email')
    list_select_related=True
    list_per_page=30
    ordering=['-fullname']
    search_fields =['fullname']
    
class typeAdmin(admin.ModelAdmin):
    list_display = ('name',)
    list_display_links = ('name',)
    list_select_related=True
    list_per_page=30
    ordering=['-name']
    search_fields =['name']
    

class unitAdmin(admin.ModelAdmin):
    list_display = ('name', 'officephone')
    list_display_links = ('name', 'officephone')
    list_select_related=True
    list_per_page=30
    ordering=['-name']
    search_fields =['name']
    
class sourceAdmin(admin.ModelAdmin):
    list_display = ('name',)
    list_display_links = ('name',)
    list_select_related=True
    list_per_page=30
    ordering=['-name']
    search_fields =['name']
      
admin.site.register(info,cstAdmin)
admin.site.register(type,typeAdmin)
admin.site.register(unit,unitAdmin)
admin.site.register(source,sourceAdmin)